home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
05
/
6
/
DISK0564.ZIP
/
SOURCE.ARC
/
B.ARC
/
KEY.AS
< prev
next >
Wrap
Text File
|
1986-04-09
|
758b
|
48 lines
; routines to access bios keyboard services
; written for Aztec C86 v. 3.20e
; by Jon Dart, Feb. 1986
MODEL equ 0 ;small code, small data
include lmacros.h
bios_int equ 22
; int keyin(c)
; /* returns 1 if key ready, 0 if not */
; char *c;
codeseg segment
procdef keyin,<<arg1,ptr>>
pushds
push si
ldptr si,arg1 ;get pointer to char
mov ah,1
int bios_int ;call bios
jz navail ;if no char.
push ax
mov ah,0
int bios_int ;remove char. from buffer
pop ax
mov [si],al ;set char.
mov ax,1
jmp exit
navail:
xor ax,ax
exit: pop si
popds
pret
pend keyin
procdef clrco ;clear type-ahead
pushds
mov ah,3
int bios_int
popds
pret
pend clrco
codeseg ends
end